/**
 * #info
 *
 * @author wuwg
 * @createTime    2018/03/20
 * @updateTime   2018/05/22
 * @description  route component
 */
import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export function createRouter () {
  return new Router({
    routes: [
      {
        path: '/',
        redirect: '/input'
      },
      // {
      //   path: '/home',
      //   component: (resolve) => require(['@/pages/home.vue'], resolve)
      // },
      // basic start (一)
      {
        path: '/panel',
        component: (resolve) => require(['@/pages/basic/panel.vue'], resolve)
      },
      {
        path: '/text',
        component: (resolve) => require(['@/pages/basic/text.vue'], resolve)
      }, {
        path: '/link',
        component: (resolve) => require(['@/pages/basic/link.vue'], resolve)
      }, {
        path: '/title',
        component: (resolve) => require(['@/pages/basic/title.vue'], resolve)
      }, {
        path: '/image',
        component: (resolve) => require(['@/pages/basic/image.vue'], resolve)
      }, {
        path: '/button',
        component: (resolve) => require(['@/pages/basic/button.vue'], resolve)
      }, {
        path: '/icon',
        component: (resolve) => require(['@/pages/basic/icon.vue'], resolve)
      }, {
        path: '/col',
        component: (resolve) => require(['@/pages/basic/col.vue'], resolve)
      }, {
        path: '/row',
        component: (resolve) => require(['@/pages/basic/row.vue'], resolve)
      }, {
        path: '/iframe',
        component: (resolve) => require(['@/pages/basic/iframe.vue'], resolve)
      },
      // basic end

      // data start (三）
      {
        path: '/badge',
        component: (resolve) => require(['@/pages/data/badge.vue'], resolve)
      },
      {
        path: '/card',
        component: (resolve) => require(['@/pages/data/card.vue'], resolve)
      }, {
        path: '/progress',
        component: (resolve) => require(['@/pages/data/progress.vue'], resolve)
      }, {
        path: '/report',
        component: (resolve) => require(['@/pages/data/report.vue'], resolve)
      }, {
        path: '/table',
        component: (resolve) => require(['@/pages/data/table.vue'], resolve)
      }, {
        path: '/tag',
        component: (resolve) => require(['@/pages/data/tag.vue'], resolve)
      }, {
        path: '/timeline',
        component: (resolve) => require(['@/pages/data/timeline.vue'], resolve)
      },
      // data end

      // form start (四)
      {
        path: '/cascader',
        component: (resolve) => require(['@/pages/form/cascader.vue'], resolve)
      },
      {
        path: '/checkbox',
        component: (resolve) => require(['@/pages/form/checkbox.vue'], resolve)
      }, {
        path: '/date-picker',
        component: (resolve) => require(['@/pages/form/date-picker.vue'], resolve)
      }, {
        path: '/form',
        component: (resolve) => require(['@/pages/form/form.vue'], resolve)
      }, {
        path: '/form-item',
        component: (resolve) => require(['@/pages/form/form-item.vue'], resolve)
      }, {
        path: '/input',
        component: (resolve) => require(['@/pages/form/input.vue'], resolve)
      }, {
        path: '/input-number',
        component: (resolve) => require(['@/pages/form/input-number.vue'], resolve)
      }, {
        path: '/input-money',
        component: (resolve) => require(['@/pages/form/input-money.vue'], resolve)
      }, {
        path: '/radio',
        component: (resolve) => require(['@/pages/form/radio.vue'], resolve)
      }, {
        path: '/rate',
        component: (resolve) => require(['@/pages/form/rate.vue'], resolve)
      }, {
        path: '/select',
        component: (resolve) => require(['@/pages/form/select.vue'], resolve)
      }, {
        path: '/select-tree',
        component: (resolve) => require(['@/pages/form/select-tree.vue'], resolve)
      }, {
        path: '/organ-tree',
        component: (resolve) => require(['@/pages/form/organ-tree.vue'], resolve)
      }, {
        path: '/slider',
        component: (resolve) => require(['@/pages/form/slider.vue'], resolve)
      }, {
        path: '/switch',
        component: (resolve) => require(['@/pages/form/switch.vue'], resolve)
      }, {
        path: '/textarea',
        component: (resolve) => require(['@/pages/form/textarea.vue'], resolve)
      }, {
        path: '/time-picker',
        component: (resolve) => require(['@/pages/form/time-picker.vue'], resolve)
      }, {
        path: '/transfer',
        component: (resolve) => require(['@/pages/form/transfer.vue'], resolve)
      }, {
        path: '/upload',
        component: (resolve) => require(['@/pages/form/upload.vue'], resolve)
      }, {
        path: '/auto-complete',
        component: (resolve) => require(['@/pages/form/auto-complete.vue'], resolve)
      },
      // form end

      // layout start (五)
      {
        path: '/region-layout',
        component: (resolve) => require(['@/pages/layout/region-layout.vue'], resolve)
      }, {
        path: '/button-group',
        component: (resolve) => require(['@/pages/layout/button-group.vue'], resolve)
      }, {
        path: '/float-layout',
        component: (resolve) => require(['@/pages/layout/float-layout.vue'], resolve)
      },
      // layout end

      // navigation start (七)
      {
        path: '/breadcrumb',
        component: (resolve) => require(['@/pages/navigation/breadcrumb.vue'], resolve)
      },
      {
        path: '/dropdown',
        component: (resolve) => require(['@/pages/navigation/dropdown.vue'], resolve)
      }, {
        path: '/menu',
        component: (resolve) => require(['@/pages/navigation/menu.vue'], resolve)
      }, {
        path: '/steps',
        component: (resolve) => require(['@/pages/navigation/steps.vue'], resolve)
      }, {
        path: '/tabs',
        component: (resolve) => require(['@/pages/navigation/tabs.vue'], resolve)
      }, {
        path: '/tree',
        component: (resolve) => require(['@/pages/navigation/tree.vue'], resolve)
      },
      // navigation end

      // notice start (八)
      {
        path: '/alert',
        component: (resolve) => require(['@/pages/notice/alert.vue'], resolve)
      },
      {
        path: '/message',
        component: (resolve) => require(['@/pages/notice/message.vue'], resolve)
      }, {
        path: '/notice',
        component: (resolve) => require(['@/pages/notice/notice.vue'], resolve)
      }, {
        path: '/poptip',
        component: (resolve) => require(['@/pages/notice/poptip.vue'], resolve)
      }, {
        path: '/tooltip',
        component: (resolve) => require(['@/pages/notice/tooltip.vue'], resolve)
      },
      // notice end

      // other start (九)
      {
        path: '/scroll',
        component: (resolve) => require(['@/pages/other/scroll.vue'], resolve)
      }, {
        path: '/markdown',
        component: (resolve) => require(['@/pages/other/markdown.vue'], resolve)
      }, {
        path: '/show-more',
        component: (resolve) => require(['@/pages/other/show-more.vue'], resolve)
      }, {
        path: '/mend-photo',
        component: (resolve) => require(['@/pages/other/mend-photo.vue'], resolve)
      },
      // other end

      // pagination start (十)
      {
        path: '/pagination',
        component: (resolve) => require(['@/pages/pagination/pagination.vue'], resolve)
      },
      // pagination end

      // popup start (十一)
      {
        path: '/modal',
        component: (resolve) => require(['@/pages/popup/modal.vue'], resolve)
      },
      // popup end

      // tools start (十二)
      {
        path: '/affix',
        component: (resolve) => require(['@/pages/tools/affix.vue'], resolve)
      },
      {
        path: '/back-top',
        component: (resolve) => require(['@/pages/tools/back-top.vue'], resolve)
      }, {
        path: '/color-picker',
        component: (resolve) => require(['@/pages/tools/color-picker.vue'], resolve)
      }, {
        path: '/divider',
        component: (resolve) => require(['@/pages/tools/divider.vue'], resolve)
      }, {
        path: '/loading-bar',
        component: (resolve) => require(['@/pages/tools/loading-bar.vue'], resolve)
      }, {
        path: '/spin',
        component: (resolve) => require(['@/pages/tools/spin.vue'], resolve)
      },
      // tools end

      // auth start (十三)
      {
        path: '/captcha-slide',
        component: (resolve) => require(['@/pages/captcha/slide/captcha-slide.vue'], resolve)
      },
      {
        path: '/captcha-string',
        component: (resolve) => require(['@/pages/captcha/string/captcha-string.vue'], resolve)
      }
      // auth end
    ]
  })
}
